from django.db import models
from utils.BaseModel import BaseModel
# Create your models here.


class NavModel(BaseModel):
    navname = models.CharField(max_length=20, verbose_name='导航名称')
    position = models.IntegerField(default=0, verbose_name='导航位置')
    class Meta:
        db_table = 'fgnav'
    def __str__(self):
        return self.navname

class BannerModel(BaseModel):
    title = models.CharField(max_length=50,verbose_name='轮播标题')
    img = models.CharField(max_length=200,verbose_name='轮播图片')
    url = models.CharField(max_length=200,verbose_name='轮播链接')
    class Meta:
        db_table = 'fgbanner'

    def __str__(self):
        return self.title